<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>溢出文本替换成省略号</title>
    <style>
        div {
            background-color: yellow;
            width: 200px;
            /*一下代码为组合代码，缺一不可*/
            white-space: nowrap;/*强制不换行*/
            overflow: hidden;/*溢出文字隐藏*/
            text-overflow: ellipsis;/*将溢出文本替换为省略号*/
        }
    </style>
</head>
<body>
<div>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad aperiam blanditiis consequatur delectus deleniti
    doloremque et excepturi, fugiat inventore magni, modi odio quam qui quidem quo similique tenetur ullam vero.
</div>
</body>
</html>